﻿<UserControl x:Class="CommonWpfControls.TestFileControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Open"
                        Executed="OpenCmdExecute"
                        CanExecute="OpenCmdCanExecute" />
    </UserControl.CommandBindings>
    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBox x:Name="tbxFolderName" Width="400" Text="{Binding FolderName}" />
            <Button x:Name="btnOpenFolder" Content="Open Folder" Command="ApplicationCommands.Open"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBox x:Name="tbxFileName" Width="400" Text="{Binding FileName, Mode=TwoWay}" />
            <Button x:Name="btnOpenFile" Content="Open File" Click="btnOpenFile_Click" />
        </StackPanel>
        <TextBlock x:Name="tbTestResult" Text="{Binding ResultString}" Foreground="Green" Margin="5"/>
        <TextBox x:Name="tbTestErrors" Text="{Binding ErrorString}"  Foreground="Red" Margin="5" />
        <TextBlock x:Name="tbTestStatus" Text="{Binding StatusString}" Foreground="Blue" Margin="5" />
    </StackPanel>
</UserControl>
